Optimal. Leaf size=115 \[ \frac {e \left (5-2 x^2\right )}{18 \left (4-5 x^2+x^4\right )}+\frac {x \left (17 d+20 f-(5 d+8 f) x^2\right )}{72 \left (4-5 x^2+x^4\right )}+\frac {1}{432} (19 d+52 f) \tanh ^{-1}\left (\frac {x}{2}\right )-\frac {1}{54} (d+7 f) \tanh ^{-1}(x)+\frac {1}{27} e \log \left (1-x^2\right )-\frac {1}{27} e \log \left (4-x^2\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 115, normalized size of antiderivative = 1.00, number of steps
used = 11, number of rules used = 9, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.391, Rules used = {1687, 1192,
1180, 213, 12, 1121, 628, 630, 31} \begin {gather*} \frac {x \left (-\left (x^2 (5 d+8 f)\right )+17 d+20 f\right )}{72 \left (x^4-5 x^2+4\right )}+\frac {1}{432} (19 d+52 f) \tanh ^{-1}\left (\frac {x}{2}\right )-\frac {1}{54} (d+7 f) \tanh ^{-1}(x)+\frac {1}{27} e \log \left (1-x^2\right )-\frac {1}{27} e \log \left (4-x^2\right )+\frac {e \left (5-2 x^2\right )}{18 \left (x^4-5 x^2+4\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 31
Rule 213
Rule 628
Rule 630
Rule 1121
Rule 1180
Rule 1192
Rule 1687
Rubi steps
\begin {align*} \int \frac {d+e x+f x^2}{\left (4-5 x^2+x^4\right )^2} \, dx &=\int \frac {e x}{\left (4-5 x^2+x^4\right )^2} \, dx+\int \frac {d+f x^2}{\left (4-5 x^2+x^4\right )^2} \, dx\\ &=\frac {x \left (17 d+20 f-(5 d+8 f) x^2\right )}{72 \left (4-5 x^2+x^4\right )}-\frac {1}{72} \int \frac {-d+20 f+(5 d+8 f) x^2}{4-5 x^2+x^4} \, dx+e \int \frac {x}{\left (4-5 x^2+x^4\right )^2} \, dx\\ &=\frac {x \left (17 d+20 f-(5 d+8 f) x^2\right )}{72 \left (4-5 x^2+x^4\right )}+\frac {1}{2} e \text {Subst}\left (\int \frac {1}{\left (4-5 x+x^2\right )^2} \, dx,x,x^2\right )-\frac {1}{54} (-d-7 f) \int \frac {1}{-1+x^2} \, dx-\frac {1}{216} (19 d+52 f) \int \frac {1}{-4+x^2} \, dx\\ &=\frac {e \left (5-2 x^2\right )}{18 \left (4-5 x^2+x^4\right )}+\frac {x \left (17 d+20 f-(5 d+8 f) x^2\right )}{72 \left (4-5 x^2+x^4\right )}+\frac {1}{432} (19 d+52 f) \tanh ^{-1}\left (\frac {x}{2}\right )-\frac {1}{54} (d+7 f) \tanh ^{-1}(x)-\frac {1}{9} e \text {Subst}\left (\int \frac {1}{4-5 x+x^2} \, dx,x,x^2\right )\\ &=\frac {e \left (5-2 x^2\right )}{18 \left (4-5 x^2+x^4\right )}+\frac {x \left (17 d+20 f-(5 d+8 f) x^2\right )}{72 \left (4-5 x^2+x^4\right )}+\frac {1}{432} (19 d+52 f) \tanh ^{-1}\left (\frac {x}{2}\right )-\frac {1}{54} (d+7 f) \tanh ^{-1}(x)-\frac {1}{27} e \text {Subst}\left (\int \frac {1}{-4+x} \, dx,x,x^2\right )+\frac {1}{27} e \text {Subst}\left (\int \frac {1}{-1+x} \, dx,x,x^2\right )\\ &=\frac {e \left (5-2 x^2\right )}{18 \left (4-5 x^2+x^4\right )}+\frac {x \left (17 d+20 f-(5 d+8 f) x^2\right )}{72 \left (4-5 x^2+x^4\right )}+\frac {1}{432} (19 d+52 f) \tanh ^{-1}\left (\frac {x}{2}\right )-\frac {1}{54} (d+7 f) \tanh ^{-1}(x)+\frac {1}{27} e \log \left (1-x^2\right )-\frac {1}{27} e \log \left (4-x^2\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.05, size = 112, normalized size = 0.97 \begin {gather*} \frac {1}{864} \left (\frac {12 \left (17 d x+20 f x-5 d x^3-8 f x^3+e \left (20-8 x^2\right )\right )}{4-5 x^2+x^4}+8 (d+4 e+7 f) \log (1-x)-(19 d+32 e+52 f) \log (2-x)-8 (d-4 e+7 f) \log (1+x)+(19 d-32 e+52 f) \log (2+x)\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.04, size = 130, normalized size = 1.13
method | result | size |
norman | \(\frac {\left (-\frac {5 d}{72}-\frac {f}{9}\right ) x^{3}+\left (\frac {17 d}{72}+\frac {5 f}{18}\right ) x -\frac {e \,x^{2}}{9}+\frac {5 e}{18}}{x^{4}-5 x^{2}+4}+\left (-\frac {19 d}{864}-\frac {e}{27}-\frac {13 f}{216}\right ) \ln \left (x -2\right )+\left (-\frac {d}{108}+\frac {e}{27}-\frac {7 f}{108}\right ) \ln \left (1+x \right )+\left (\frac {d}{108}+\frac {e}{27}+\frac {7 f}{108}\right ) \ln \left (-1+x \right )+\left (\frac {19 d}{864}-\frac {e}{27}+\frac {13 f}{216}\right ) \ln \left (x +2\right )\) | \(105\) |
default | \(-\frac {\frac {d}{144}-\frac {e}{72}+\frac {f}{36}}{x +2}+\left (\frac {19 d}{864}-\frac {e}{27}+\frac {13 f}{216}\right ) \ln \left (x +2\right )+\left (-\frac {19 d}{864}-\frac {e}{27}-\frac {13 f}{216}\right ) \ln \left (x -2\right )-\frac {\frac {d}{144}+\frac {e}{72}+\frac {f}{36}}{x -2}-\frac {\frac {d}{36}+\frac {e}{36}+\frac {f}{36}}{-1+x}+\left (\frac {d}{108}+\frac {e}{27}+\frac {7 f}{108}\right ) \ln \left (-1+x \right )+\left (-\frac {d}{108}+\frac {e}{27}-\frac {7 f}{108}\right ) \ln \left (1+x \right )-\frac {\frac {d}{36}-\frac {e}{36}+\frac {f}{36}}{1+x}\) | \(130\) |
risch | \(\frac {\left (-\frac {5 d}{72}-\frac {f}{9}\right ) x^{3}+\left (\frac {17 d}{72}+\frac {5 f}{18}\right ) x -\frac {e \,x^{2}}{9}+\frac {5 e}{18}}{x^{4}-5 x^{2}+4}+\frac {19 \ln \left (x +2\right ) d}{864}-\frac {\ln \left (x +2\right ) e}{27}+\frac {13 \ln \left (x +2\right ) f}{216}+\frac {\ln \left (1-x \right ) d}{108}+\frac {\ln \left (1-x \right ) e}{27}+\frac {7 \ln \left (1-x \right ) f}{108}-\frac {19 \ln \left (2-x \right ) d}{864}-\frac {\ln \left (2-x \right ) e}{27}-\frac {13 \ln \left (2-x \right ) f}{216}-\frac {\ln \left (1+x \right ) d}{108}+\frac {\ln \left (1+x \right ) e}{27}-\frac {7 \ln \left (1+x \right ) f}{108}\) | \(141\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 112, normalized size = 0.97 \begin {gather*} \frac {1}{864} \, {\left (19 \, d + 52 \, f - 32 \, e\right )} \log \left (x + 2\right ) - \frac {1}{108} \, {\left (d + 7 \, f - 4 \, e\right )} \log \left (x + 1\right ) + \frac {1}{108} \, {\left (d + 7 \, f + 4 \, e\right )} \log \left (x - 1\right ) - \frac {1}{864} \, {\left (19 \, d + 52 \, f + 32 \, e\right )} \log \left (x - 2\right ) - \frac {{\left (5 \, d + 8 \, f\right )} x^{3} + 8 \, x^{2} e - {\left (17 \, d + 20 \, f\right )} x - 20 \, e}{72 \, {\left (x^{4} - 5 \, x^{2} + 4\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 217 vs.
\(2 (100) = 200\).
time = 0.52, size = 217, normalized size = 1.89 \begin {gather*} -\frac {12 \, {\left (5 \, d + 8 \, f\right )} x^{3} + 96 \, e x^{2} - 12 \, {\left (17 \, d + 20 \, f\right )} x - {\left ({\left (19 \, d - 32 \, e + 52 \, f\right )} x^{4} - 5 \, {\left (19 \, d - 32 \, e + 52 \, f\right )} x^{2} + 76 \, d - 128 \, e + 208 \, f\right )} \log \left (x + 2\right ) + 8 \, {\left ({\left (d - 4 \, e + 7 \, f\right )} x^{4} - 5 \, {\left (d - 4 \, e + 7 \, f\right )} x^{2} + 4 \, d - 16 \, e + 28 \, f\right )} \log \left (x + 1\right ) - 8 \, {\left ({\left (d + 4 \, e + 7 \, f\right )} x^{4} - 5 \, {\left (d + 4 \, e + 7 \, f\right )} x^{2} + 4 \, d + 16 \, e + 28 \, f\right )} \log \left (x - 1\right ) + {\left ({\left (19 \, d + 32 \, e + 52 \, f\right )} x^{4} - 5 \, {\left (19 \, d + 32 \, e + 52 \, f\right )} x^{2} + 76 \, d + 128 \, e + 208 \, f\right )} \log \left (x - 2\right ) - 240 \, e}{864 \, {\left (x^{4} - 5 \, x^{2} + 4\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 5.73, size = 115, normalized size = 1.00 \begin {gather*} \frac {1}{864} \, {\left (19 \, d + 52 \, f - 32 \, e\right )} \log \left ({\left | x + 2 \right |}\right ) - \frac {1}{108} \, {\left (d + 7 \, f - 4 \, e\right )} \log \left ({\left | x + 1 \right |}\right ) + \frac {1}{108} \, {\left (d + 7 \, f + 4 \, e\right )} \log \left ({\left | x - 1 \right |}\right ) - \frac {1}{864} \, {\left (19 \, d + 52 \, f + 32 \, e\right )} \log \left ({\left | x - 2 \right |}\right ) - \frac {5 \, d x^{3} + 8 \, f x^{3} + 8 \, x^{2} e - 17 \, d x - 20 \, f x - 20 \, e}{72 \, {\left (x^{4} - 5 \, x^{2} + 4\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.10, size = 107, normalized size = 0.93 \begin {gather*} \ln \left (x-1\right )\,\left (\frac {d}{108}+\frac {e}{27}+\frac {7\,f}{108}\right )-\ln \left (x+1\right )\,\left (\frac {d}{108}-\frac {e}{27}+\frac {7\,f}{108}\right )-\ln \left (x-2\right )\,\left (\frac {19\,d}{864}+\frac {e}{27}+\frac {13\,f}{216}\right )+\ln \left (x+2\right )\,\left (\frac {19\,d}{864}-\frac {e}{27}+\frac {13\,f}{216}\right )+\frac {\left (-\frac {5\,d}{72}-\frac {f}{9}\right )\,x^3-\frac {e\,x^2}{9}+\left (\frac {17\,d}{72}+\frac {5\,f}{18}\right )\,x+\frac {5\,e}{18}}{x^4-5\,x^2+4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________